package com.pets.springboot_petshop.service.impl;

import com.pets.springboot_petshop.entity.Useraddress;
import com.pets.springboot_petshop.mapper.UseraddressMapper;
import com.pets.springboot_petshop.service.UseraddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: wxk
 * @Email: 2089967794@qq.com
 * @Date: 2024/10/15 上午11:52 周二
 * @Description: 地址服务层
 */
@Service
public class UseraddressServiceImpl implements UseraddressService {
    @Autowired
    private UseraddressMapper useraddressMapper;

    @Override
    public Useraddress select(int id) {
        return useraddressMapper.select(id);
    }

    @Override
    public List<Useraddress> selectuser_id(int user_id) {
        return useraddressMapper.selectuser_id(user_id);
    }

    @Override
    public List<Useraddress> findAll() {
        return useraddressMapper.findAll();
    }

    @Override
    public int add(Useraddress useraddress) {
        return useraddressMapper.add(useraddress);
    }

    @Override
    public int delete(int id) {
        return useraddressMapper.delete(id);
    }

    @Override
    public int update(Useraddress useraddress) {
        return useraddressMapper.update(useraddress);
    }

    @Override
    public int deleteUser(Useraddress useraddress) {
        return useraddressMapper.deleteUser(useraddress);
    }
}
